﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace yule.Service.Sys
{
    /// <summary>
    /// 用户服务类
    /// </summary>
    public class User : BaseService, yule.IService.Sys.IUser
    {

        public yule.Model.Sys.User GetUser(string id)
        {
            yule.DAL.Sys.User userDAL = new DAL.Sys.User();
            return userDAL.Select(id);
        }


        public IList<Model.Sys.User> GetList()
        {
            yule.DAL.Sys.User userDAL = new DAL.Sys.User();
            return userDAL.List();
        }

        public int Delete(string id)
        {
            yule.DAL.Sys.User userDAL = new DAL.Sys.User();
            return userDAL.Delete(id, yule.Data.DBHelper.Instance);
        }


        public int Update(Model.Sys.User model)
        {
            yule.DAL.Sys.User userDAL = new DAL.Sys.User();
            return userDAL.Update(model, yule.Data.DBHelper.Instance);
        }


        public int Insert(Model.Sys.User model)
        {
            yule.DAL.Sys.User userDAL = new DAL.Sys.User();
            return userDAL.Insert(model, yule.Data.DBHelper.Instance);
        }

    }

}